Skip to content

Conversation

@nalimilan
Copy link
Member

Current code fails when using custom paths. Save directory where Julia source is stored during build in SOURCEDIR instead of assuming it can be computed from BINDIR (new name chosen to avoid confusing with build_dir which is different). Use DATAROOTDIR and DATAROOT instead of hardcoding usr/share/ and share/.

Fix/continuation of #56601, #56627.

Current code fails when using custom paths. Save directory where Julia source
is stored during build in `SOURCEDIR` instead of assuming it can be computed
from `BINDIR` (new name chosen to avoid confusing with `build_dir` which is different).
Use `DATAROOTDIR` and `DATAROOT`  instead of hardcoding `usr/share/` and `share/`.

Fix/continuation of #56601, #56627.
base/Makefile Outdated
@printf "%s\n" "const PRIVATE_LIBDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libdir_rel)))) >> $@
@printf "%s\n" "const PRIVATE_LIBEXECDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libexecdir_rel)))) >> $@
@printf "%s\n" "const INCLUDEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(includedir_rel)))) >> $@
@printf "%s\n" "const SOURCEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(JULIAHOME)))) >> $@
Copy link
Member Author

@nalimilan nalimilan Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this new constant is needed as paths to source files are those at build time. BUILD_ROOT_PATH which was defined below was incorrect in claiming that it pointed to the build-time source path as it was based on BINDIR, yet there's no guarantee that the julia executable during build time is next to the source dir.

Failure for `@juliasrc`: SOURCEDIR was "/c/workdir" (giving "\\c\\workdir") on Windows builder,
while "C:\\workdir" was expected.
Failure for `@Compiler`: missing ending slash meant that remainder was an absolute path.
Minor cleanups.
@nalimilan
Copy link
Member Author

CI failure on test x86_64-linux-gnuassertrr seems unrelated.

@IanButterworth IanButterworth added backport 1.12 Change should be backported to release-1.12 backport 1.13 labels Nov 2, 2025
@IanButterworth IanButterworth added the merge me PR is reviewed. Merge when all tests are passing label Nov 2, 2025
@KristofferC KristofferC mentioned this pull request Nov 5, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12 backport 1.13 merge me PR is reviewed. Merge when all tests are passing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants